package org.bedracket.pgeg.init;

import net.minecraft.world.item.Tier;
import net.minecraft.world.item.crafting.Ingredient;

import java.util.function.Supplier;

public enum EModTiers implements Tier{

    ORICHALCUM(3, 1561, 8.0F, 3.0F, 10,
            () -> Ingredient.of(ModItems.ORICHALCUM_INGOT.get())),
    SATURNIUM(5, 1561, 8.0F, 3.0F, 10,
            () -> Ingredient.of(ModItems.SATURNIUM_INGOT.get())),
    BRIMSTONE(4, 1561, 8.0F, 3.0F, 10,
            () -> Ingredient.of(ModItems.BRIMSTONE_INGOT.get())),
    METEORITE(6, 1561, 8.0F, 3.0F, 10,
            () -> Ingredient.of(ModItems.ORICHALCUM_INGOT.get())),
    SILVER(5, 1564, 8.0F, 3.0F, 10,
            () -> Ingredient.of(ModItems.SILVER_INGOT.get())),
    MITHRIL(4, 1561, 8.0F, 3.0F, 10,
            () -> Ingredient.of(ModItems.MITHRIL_INGOT.get()));

    private final int level;
    private final int uses;
    private final float speed;
    private final float damage;
    private final int enchantmentValue;
    private final Supplier<Ingredient> repairIngredient;

    EModTiers(int level, int uses, float speed, float damage, int enchantmentValue, Supplier<Ingredient> repairIngredient) {
        this.level = level;
        this.uses = uses;
        this.speed = speed;
        this.damage = damage;
        this.enchantmentValue = enchantmentValue;
        this.repairIngredient = repairIngredient;
    }

    @Override
    public int getUses() {
        return uses;
    }

    @Override
    public float getSpeed() {
        return speed;
    }

    @Override
    public float getAttackDamageBonus() {
        return damage;
    }

    @Override
    public int getLevel() {
        return level;
    }

    @Override
    public int getEnchantmentValue() {
        return enchantmentValue;
    }

    @Override
    public Ingredient getRepairIngredient() {
        return repairIngredient.get();
    }
}
